package com.ys.extend.utils;

import javax.servlet.http.HttpServletRequest;

public class ResourceUtil {

	public static String getRequestPath(HttpServletRequest request) {
		String requestPath = request.getRequestURI();
		//修正restful连接不能被提去除的问题
//		if(request.getQueryString()!=null){
//			requestPath=requestPath+ "?" + request.getQueryString();
//		}
//		if (requestPath.indexOf("&") > -1) {// 去掉其他参数
//			requestPath = requestPath.substring(0, requestPath.indexOf("&"));
//		}
		requestPath = requestPath.substring(request.getContextPath().length() + 1);// 去掉项目路径
		return requestPath;
	}
}
